import { createAction } from "redux-actions";

/** 链接状态 */
export const REALTIME_CONNECT = "REALTIME_CONNECT";
export const realtimeConnect = createAction(REALTIME_CONNECT, (status) => status);

/** 跟踪状态 */
export const REALTIME_TRACING = "REALTIME_TRACING";
export const realtimeTracing = createAction(REALTIME_TRACING, (status) => status);

/** 订阅主题 */
export const REALTIME_SUBSCRIBE = "REALTIME_SUBSCRIBE";
export const realtimeSubscribe = createAction(REALTIME_SUBSCRIBE, (filter) => filter);

/** 取消订阅 */
export const REALTIME_UNSUBSCRIBE = "REALTIME_UNSUBSCRIBE";
export const realtimeUnSubscribe = createAction(REALTIME_UNSUBSCRIBE, (filter) => filter);

/** 实时数据到达 */
export const REALTIME_MESSAGE = "REALTIME_MESSAGE";
export const realtimeMessage = createAction(REALTIME_MESSAGE, (message) => message);